<template>
	<view :class="[empty ? '' : 'padding-lr-sm']">
		<!-- 空白页 -->
		<use-empty v-if="empty" e-style="round" e-type="cart" :btn-tip="false" tip="暂无记录"></use-empty>
		
		<view v-else class="padding bg-main border-radius margin-top-sm" v-for="(item, idx) in datas" :key="idx">
			<view class="dflex-b">
				<view class="dflex">
					<view class="margin-right-sm">
						<view class="">
							<image :src="item.member_headimg || 'https://img.shihuashengyi.cn/static/images/user/default.png'" class="border-radius-lg headimg" mode="" style="width: 66rpx; height: 66rpx;"></image>
						</view>
					</view>
					<view class="">
						<view class="fwb">
							{{ item.member_name || item.member_nickname || '世华圣医用户' }}
						</view>
						<view class="fs-xxs">
							{{ item.member_city || $api.format(item.myfxs_time, 'yyyy/MM/dd hh:mm') }}
						</view>
					</view>
				</view>
				<view class="dflex-c dflex-flow-c">
					<view class="bg-base border-radius-lg fs-xxs" style="padding: 2rpx 20rpx;">
						{{item.myfxs_order_cnt || 0}}单
					</view>
					<view class="">
						￥<text class="fwb">{{item.myfxs_profit_amount / 100 || 0}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				empty: false,
				datas: []
			};
		},
		onLoad() {
			this.loadData();
		},
		methods: {
			loadData() {
				
				this.$func.usemall.call('fxs/member').then(res => {
					if (res.code == 200) {
						this.datas = res.datas.data;
						
						this.empty = !(this.datas && this.datas.length > 0);
						console.log('datas', this.datas)
					}
				});
				
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f5f5f5;
	}
</style>
